package com.isesol.service.impl;

import com.isesol.mapper.*;
import com.isesol.model.*;
import com.isesol.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.*;

/**
 * Created by zl on 2015/8/27.
 */

@Service
public class UserServiceImpl implements IUserService{

	@Autowired
	private UserInfoMapper userInfoMapper;

	@Override
	public UserInfo getUserById(int id){

		return userInfoMapper.selectByPrimaryKey(id);
	}

	@Override
	public List<UserInfo> getUsers(){

		return userInfoMapper.selectAll();
	}

	@Override
	public int insert(UserInfo userInfo){

		int result = userInfoMapper.insert(userInfo);

		System.out.println(result);
		return result;
	}
}
